#include<stdio.h>
int main()
{
    int M;//Number input
    int record=1,time=1,all_record;
    char C;
    scanf("%d %c",&M,&C);
    M=M-record;
    while(M >= record*2)
    {
        record +=2;
        time++;//or you can see as height
        M=M-record*2;
    }
    all_record = record;
    for(int j=0;j<time;j++)
    {
        for(int j_i=0;j_i<j;j_i++)
        {
            printf(" ");
        }
        for(int i=0;i<record;i++)
        {
            printf("%c",C);
        }
        record -=2;
        if(j<(time-1))  printf("\n");
    }
    record = record + 4;
    time--;
    for(int j=time;j>0;j--)
    {
        printf("\n");
        for(int j_i=1;j_i<j;j_i++)
        {
            printf(" ");
        }
        for(int i=0;i<record;i++)
        {
            printf("%c",C);
        }
        record +=2;
        
    }
    printf("%d", M);
    return 0;
}  